package UserInterface;


import javax.swing.*;

import java.awt.Font;
import java.awt.Color;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import java.awt.event.ActionListener;

public class MaintenanceInputBill extends JPanel{
	JLabel inputTenLabel= new JLabel("10:",10);
	JTextField inputTenField= new JTextField(10);
	JLabel inputFiftyLabel= new JLabel("50:",10);
	JTextField inpuFiftyField= new JTextField(10);
	JLabel inputHundredLabel= new JLabel("100:",10);
	JTextField inpuHundredField= new JTextField(10);
	JLabel inputTwoHundredLabel= new JLabel("200:",10);
	JTextField inputTwoHundredField= new JTextField(10);
	private final JLabel lblNewLabel = new JLabel("Currency:");
	private final JLabel label = new JLabel("UAN");
	private final JButton btnNewButton = new JButton("Put");
	
	public void addOkListener(ActionListener list){
		btnNewButton.addActionListener(list);
	}
	
	public String get10(){
		return inputTenField.getText();
	}
	public String get50(){
		return inpuFiftyField.getText();
	}
	public String get100(){
		return inpuHundredField.getText();
	}
	public String get200(){
		return inputTwoHundredField.getText();
	}
	
	
	private void makePanel(){
		GridBagLayout gridBagLayout = new GridBagLayout();
		gridBagLayout.columnWidths = new int[]{57, 40, 62, 297, 0};
		gridBagLayout.rowHeights = new int[]{33, 36, 1, 0, 10, 0, 33, 22, 38, 51, 0, 0, 39, 0};
		gridBagLayout.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		gridBagLayout.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		setLayout(gridBagLayout);
		
		GridBagConstraints gbc_lblNewLabel = new GridBagConstraints();
		gbc_lblNewLabel.fill = GridBagConstraints.BOTH;
		gbc_lblNewLabel.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel.gridwidth = 2;
		gbc_lblNewLabel.gridx = 1;
		gbc_lblNewLabel.gridy = 0;
		add(lblNewLabel, gbc_lblNewLabel);
		
		GridBagConstraints gbc_label = new GridBagConstraints();
		gbc_label.anchor = GridBagConstraints.EAST;
		gbc_label.fill = GridBagConstraints.VERTICAL;
		gbc_label.insets = new Insets(0, 0, 5, 0);
		gbc_label.gridx = 3;
		gbc_label.gridy = 0;
		add(label, gbc_label);
		inputTenLabel.setFont(new Font("Tahoma", Font.BOLD, 18));
		
			GridBagConstraints gbc_inputTenLabel = new GridBagConstraints();
			gbc_inputTenLabel.anchor = GridBagConstraints.NORTHWEST;
			gbc_inputTenLabel.insets = new Insets(0, 0, 5, 5);
			gbc_inputTenLabel.gridx = 1;
			gbc_inputTenLabel.gridy = 2;
			this.add(inputTenLabel, gbc_inputTenLabel);
		GridBagConstraints gbc_inputTenField = new GridBagConstraints();
		gbc_inputTenField.fill = GridBagConstraints.BOTH;
		gbc_inputTenField.insets = new Insets(0, 0, 5, 0);
		gbc_inputTenField.gridx = 3;
		gbc_inputTenField.gridy = 2;
		this.add(inputTenField, gbc_inputTenField);
		inputFiftyLabel.setFont(new Font("Tahoma", Font.BOLD, 18));
		GridBagConstraints gbc_inputFiftyLabel = new GridBagConstraints();
		gbc_inputFiftyLabel.anchor = GridBagConstraints.NORTHWEST;
		gbc_inputFiftyLabel.insets = new Insets(0, 0, 5, 5);
		gbc_inputFiftyLabel.gridx = 1;
		gbc_inputFiftyLabel.gridy = 4;
		this.add(inputFiftyLabel, gbc_inputFiftyLabel);
		GridBagConstraints gbc_inpuFiftyField = new GridBagConstraints();
		gbc_inpuFiftyField.insets = new Insets(0, 0, 5, 0);
		gbc_inpuFiftyField.anchor = GridBagConstraints.NORTH;
		gbc_inpuFiftyField.fill = GridBagConstraints.HORIZONTAL;
		gbc_inpuFiftyField.gridx = 3;
		gbc_inpuFiftyField.gridy = 4;
		this.add(inpuFiftyField, gbc_inpuFiftyField);
		inputHundredLabel.setFont(new Font("Tahoma", Font.BOLD, 18));
		GridBagConstraints gbc_inputHundredLabel = new GridBagConstraints();
		gbc_inputHundredLabel.anchor = GridBagConstraints.NORTHWEST;
		gbc_inputHundredLabel.insets = new Insets(0, 0, 5, 5);
		gbc_inputHundredLabel.gridx = 1;
		gbc_inputHundredLabel.gridy = 6;
		this.add(inputHundredLabel, gbc_inputHundredLabel);
		GridBagConstraints gbc_inpuHundredField = new GridBagConstraints();
		gbc_inpuHundredField.fill = GridBagConstraints.BOTH;
		gbc_inpuHundredField.insets = new Insets(0, 0, 5, 0);
		gbc_inpuHundredField.gridx = 3;
		gbc_inpuHundredField.gridy = 6;
		this.add(inpuHundredField, gbc_inpuHundredField);
		inputTwoHundredLabel.setFont(new Font("Tahoma", Font.BOLD, 18));
		GridBagConstraints gbc_inputTwoHundredLabel = new GridBagConstraints();
		gbc_inputTwoHundredLabel.anchor = GridBagConstraints.SOUTHWEST;
		gbc_inputTwoHundredLabel.insets = new Insets(0, 0, 5, 5);
		gbc_inputTwoHundredLabel.gridx = 1;
		gbc_inputTwoHundredLabel.gridy = 8;
		this.add(inputTwoHundredLabel, gbc_inputTwoHundredLabel);
		GridBagConstraints gbc_inputTwoHundredField = new GridBagConstraints();
		gbc_inputTwoHundredField.anchor = GridBagConstraints.NORTH;
		gbc_inputTwoHundredField.fill = GridBagConstraints.HORIZONTAL;
		gbc_inputTwoHundredField.insets = new Insets(0, 0, 5, 0);
		gbc_inputTwoHundredField.gridx = 3;
		gbc_inputTwoHundredField.gridy = 8;
		this.add(inputTwoHundredField, gbc_inputTwoHundredField);
		//SpringUtilities.makeGrid(this,4,2,1,1,10,10);
		
	}
	MaintenanceInputBill(){
		setBackground(new Color(255, 248, 220));
		//this.setSize(100,100);
		makePanel();
		this.setSize(540,434);
		lblNewLabel.setForeground(new Color(128, 0, 0));
		lblNewLabel.setFont(new Font("Arial", Font.BOLD | Font.ITALIC, 18));
		label.setFont(new Font("Tahoma", Font.PLAIN, 16));
		
		GridBagConstraints gbc_btnNewButton = new GridBagConstraints();
		gbc_btnNewButton.insets = new Insets(0, 0, 5, 0);
		gbc_btnNewButton.fill = GridBagConstraints.BOTH;
		gbc_btnNewButton.gridx = 3;
		gbc_btnNewButton.gridy = 11;
		add(btnNewButton, gbc_btnNewButton);
		btnNewButton.setForeground(new Color(128, 0, 0));
		btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 16));
	}
}
